package com.wenge.datagroup.storage.dataprocess;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @description
 * @Projectname: centrecollect_temp
 * @Author: lzh
 * @Data:2022/12/30 17:25
 * @Description: TODO
 */
public class SpaceFilter {
    static Pattern space =Pattern.compile(" {2} +");
    public static String filter(String source){
        if (source != null) {
            Matcher emojiMatcher = space.matcher(source);
            if (emojiMatcher.find()) {
                source = emojiMatcher.replaceAll("\n");
                return source;
            }
            return source;
        }

        return source;

    }


}
